<#include "./template/general_temp.ftl">

<#macro content>
<div class="row" xmlns:input="http://www.w3.org/1999/html" xmlns:input="http://www.w3.org/1999/html">
    <div class="box col-md-12">
        <div class="box-inner">
            <div class="box-header well" data-original-title="">
                <h2><i class="glyphicon glyphicon-edit"></i>编辑</h2>

                <div class="box-icon">
                    <a href="#" class="btn btn-setting btn-round btn-default"><i class="glyphicon glyphicon-cog"></i></a>
                    <a href="#" class="btn btn-minimize btn-round btn-default"><i class="glyphicon glyphicon-chevron-up"></i></a>
                    <a href="#" class="btn btn-close btn-round btn-default"><i class="glyphicon glyphicon-remove"></i></a>
                </div>
            </div>
            <div class="box-content">
                <#if !no_obj??>
                    <@form.form modelAttribute="editMessageCommand" role="form" enctype="multipart/form-data">
                        <@form.errors path='*' element="div" cssClass="alert alert-success" cssErrorClass="alert alert-danger"/>
                        <#if no_error??>
                            <div class="alert alert-success">
                                <strong>Well done! </strong>发送成功。
                            </div>
                        </#if>
                        <div class="form-group">
                            <label for="cat">分类</label>
                            <@form.select path="selectRoleId">
                                <option value="0">全部</option>
                                <#list roles as role>
                                    <@form.option value="${role.id}" label="${role.description}" />
                                </#list>
                            </@form.select>
                        </div>
                        <div class="form-group">
                            <label for="title">标题</label>
                            <@form.input path="title" cssClass="form-control" id="title"/>
                        </div>
                        <div class="form-group">
                            <label for="content">内容</label>
                            <@form.textarea cssClass="form-control" path="content" id="content"/>
                        </div>
                        <button type="submit" class="btn btn-default">发送</button>
                    </@form.form>
                <#else>
                    <div class="alert alert-danger">
                        <button type="button" class="close" data-dismiss="alert">×</button>
                        <strong>Oh snap!</strong>没有找到数据！
                    </div>
                </#if>
            </div>
        </div>
    </div>
    <!--/span-->
</div>
<!--/row-->
</#macro>

<#macro script>
</#macro>
